package com.honor.games.wg.entities;

import static com.google.common.base.Preconditions.*;

public enum WGPlayerType {
	PLAYER1, PLAYER2;
	
	public static WGPlayerType getPlayerType(String stringPlayerType) {
		
		checkNotNull(stringPlayerType);
		
		if(stringPlayerType.equals("p1")) {
			return WGPlayerType.PLAYER1;
		} else if(stringPlayerType.equals("p2")) {
			return WGPlayerType.PLAYER2;
		}
		
		return WGPlayerType.PLAYER1;
	}
}
